package com.hzncc.flowable_diboot.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.diboot.core.entity.BaseModel;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import jakarta.validation.constraints.NotNull;

/**
* 表单设计 Entity 定义
* @author MyName
* @version 1.0
* @date 2024-07-17
* Copyright © MyCorp
*/

@TableName("mdl_form_design")
@Getter @Setter @Accessors(chain = true)
public class FormDesign extends BaseModel {
    private static final long serialVersionUID = 1195124610326863534L;

    /**
     * 租户
     */
    @NotNull(message = "租户不能为空")
    @TableField()
    private String tenantId;

    /**
     * 表单编码
     */
    @Length(max=100, message="表单编码长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String formCode;

    /**
     * 表单生成规则
     */
    @TableField()
    private String customerFormRule;

    /**
     * 组件参数配置
     */
    @TableField()
    private String customerFormOptions;

    /**
     * 表单名称
     */
    @Length(max=100, message="表单名称长度应小于100")
    @BindQuery(comparison = Comparison.LIKE)
    @TableField()
    private String formName;

    /**
     * 表单类型
     */
    @TableField()
    private String cate;

    /**
     * 状态
     */
    @TableField()
    private Integer status;
}